package org.hxyjs.entity;

import java.util.ArrayList;
import java.util.List;

public class ClazzExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    private Integer limit;

    private Integer offset;

    public ClazzExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    public void setLimit(Integer limit) {
        this.limit = limit;
    }

    public Integer getLimit() {
        return limit;
    }

    public void setOffset(Integer offset) {
        this.offset = offset;
    }

    public Integer getOffset() {
        return offset;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andClnoIsNull() {
            addCriterion("clno is null");
            return (Criteria) this;
        }

        public Criteria andClnoIsNotNull() {
            addCriterion("clno is not null");
            return (Criteria) this;
        }

        public Criteria andClnoEqualTo(String value) {
            addCriterion("clno =", value, "clno");
            return (Criteria) this;
        }

        public Criteria andClnoNotEqualTo(String value) {
            addCriterion("clno <>", value, "clno");
            return (Criteria) this;
        }

        public Criteria andClnoGreaterThan(String value) {
            addCriterion("clno >", value, "clno");
            return (Criteria) this;
        }

        public Criteria andClnoGreaterThanOrEqualTo(String value) {
            addCriterion("clno >=", value, "clno");
            return (Criteria) this;
        }

        public Criteria andClnoLessThan(String value) {
            addCriterion("clno <", value, "clno");
            return (Criteria) this;
        }

        public Criteria andClnoLessThanOrEqualTo(String value) {
            addCriterion("clno <=", value, "clno");
            return (Criteria) this;
        }

        public Criteria andClnoLike(String value) {
            addCriterion("clno like", value, "clno");
            return (Criteria) this;
        }

        public Criteria andClnoNotLike(String value) {
            addCriterion("clno not like", value, "clno");
            return (Criteria) this;
        }

        public Criteria andClnoIn(List<String> values) {
            addCriterion("clno in", values, "clno");
            return (Criteria) this;
        }

        public Criteria andClnoNotIn(List<String> values) {
            addCriterion("clno not in", values, "clno");
            return (Criteria) this;
        }

        public Criteria andClnoBetween(String value1, String value2) {
            addCriterion("clno between", value1, value2, "clno");
            return (Criteria) this;
        }

        public Criteria andClnoNotBetween(String value1, String value2) {
            addCriterion("clno not between", value1, value2, "clno");
            return (Criteria) this;
        }

        public Criteria andSnoIsNull() {
            addCriterion("sno is null");
            return (Criteria) this;
        }

        public Criteria andSnoIsNotNull() {
            addCriterion("sno is not null");
            return (Criteria) this;
        }

        public Criteria andSnoEqualTo(String value) {
            addCriterion("sno =", value, "sno");
            return (Criteria) this;
        }

        public Criteria andSnoNotEqualTo(String value) {
            addCriterion("sno <>", value, "sno");
            return (Criteria) this;
        }

        public Criteria andSnoGreaterThan(String value) {
            addCriterion("sno >", value, "sno");
            return (Criteria) this;
        }

        public Criteria andSnoGreaterThanOrEqualTo(String value) {
            addCriterion("sno >=", value, "sno");
            return (Criteria) this;
        }

        public Criteria andSnoLessThan(String value) {
            addCriterion("sno <", value, "sno");
            return (Criteria) this;
        }

        public Criteria andSnoLessThanOrEqualTo(String value) {
            addCriterion("sno <=", value, "sno");
            return (Criteria) this;
        }

        public Criteria andSnoLike(String value) {
            addCriterion("sno like", value, "sno");
            return (Criteria) this;
        }

        public Criteria andSnoNotLike(String value) {
            addCriterion("sno not like", value, "sno");
            return (Criteria) this;
        }

        public Criteria andSnoIn(List<String> values) {
            addCriterion("sno in", values, "sno");
            return (Criteria) this;
        }

        public Criteria andSnoNotIn(List<String> values) {
            addCriterion("sno not in", values, "sno");
            return (Criteria) this;
        }

        public Criteria andSnoBetween(String value1, String value2) {
            addCriterion("sno between", value1, value2, "sno");
            return (Criteria) this;
        }

        public Criteria andSnoNotBetween(String value1, String value2) {
            addCriterion("sno not between", value1, value2, "sno");
            return (Criteria) this;
        }

        public Criteria andClnameIsNull() {
            addCriterion("clName is null");
            return (Criteria) this;
        }

        public Criteria andClnameIsNotNull() {
            addCriterion("clName is not null");
            return (Criteria) this;
        }

        public Criteria andClnameEqualTo(String value) {
            addCriterion("clName =", value, "clname");
            return (Criteria) this;
        }

        public Criteria andClnameNotEqualTo(String value) {
            addCriterion("clName <>", value, "clname");
            return (Criteria) this;
        }

        public Criteria andClnameGreaterThan(String value) {
            addCriterion("clName >", value, "clname");
            return (Criteria) this;
        }

        public Criteria andClnameGreaterThanOrEqualTo(String value) {
            addCriterion("clName >=", value, "clname");
            return (Criteria) this;
        }

        public Criteria andClnameLessThan(String value) {
            addCriterion("clName <", value, "clname");
            return (Criteria) this;
        }

        public Criteria andClnameLessThanOrEqualTo(String value) {
            addCriterion("clName <=", value, "clname");
            return (Criteria) this;
        }

        public Criteria andClnameLike(String value) {
            addCriterion("clName like", value, "clname");
            return (Criteria) this;
        }

        public Criteria andClnameNotLike(String value) {
            addCriterion("clName not like", value, "clname");
            return (Criteria) this;
        }

        public Criteria andClnameIn(List<String> values) {
            addCriterion("clName in", values, "clname");
            return (Criteria) this;
        }

        public Criteria andClnameNotIn(List<String> values) {
            addCriterion("clName not in", values, "clname");
            return (Criteria) this;
        }

        public Criteria andClnameBetween(String value1, String value2) {
            addCriterion("clName between", value1, value2, "clname");
            return (Criteria) this;
        }

        public Criteria andClnameNotBetween(String value1, String value2) {
            addCriterion("clName not between", value1, value2, "clname");
            return (Criteria) this;
        }

        public Criteria andClstateIsNull() {
            addCriterion("clState is null");
            return (Criteria) this;
        }

        public Criteria andClstateIsNotNull() {
            addCriterion("clState is not null");
            return (Criteria) this;
        }

        public Criteria andClstateEqualTo(Integer value) {
            addCriterion("clState =", value, "clstate");
            return (Criteria) this;
        }

        public Criteria andClstateNotEqualTo(Integer value) {
            addCriterion("clState <>", value, "clstate");
            return (Criteria) this;
        }

        public Criteria andClstateGreaterThan(Integer value) {
            addCriterion("clState >", value, "clstate");
            return (Criteria) this;
        }

        public Criteria andClstateGreaterThanOrEqualTo(Integer value) {
            addCriterion("clState >=", value, "clstate");
            return (Criteria) this;
        }

        public Criteria andClstateLessThan(Integer value) {
            addCriterion("clState <", value, "clstate");
            return (Criteria) this;
        }

        public Criteria andClstateLessThanOrEqualTo(Integer value) {
            addCriterion("clState <=", value, "clstate");
            return (Criteria) this;
        }

        public Criteria andClstateIn(List<Integer> values) {
            addCriterion("clState in", values, "clstate");
            return (Criteria) this;
        }

        public Criteria andClstateNotIn(List<Integer> values) {
            addCriterion("clState not in", values, "clstate");
            return (Criteria) this;
        }

        public Criteria andClstateBetween(Integer value1, Integer value2) {
            addCriterion("clState between", value1, value2, "clstate");
            return (Criteria) this;
        }

        public Criteria andClstateNotBetween(Integer value1, Integer value2) {
            addCriterion("clState not between", value1, value2, "clstate");
            return (Criteria) this;
        }

        public Criteria andCladdressIsNull() {
            addCriterion("clAddress is null");
            return (Criteria) this;
        }

        public Criteria andCladdressIsNotNull() {
            addCriterion("clAddress is not null");
            return (Criteria) this;
        }

        public Criteria andCladdressEqualTo(String value) {
            addCriterion("clAddress =", value, "claddress");
            return (Criteria) this;
        }

        public Criteria andCladdressNotEqualTo(String value) {
            addCriterion("clAddress <>", value, "claddress");
            return (Criteria) this;
        }

        public Criteria andCladdressGreaterThan(String value) {
            addCriterion("clAddress >", value, "claddress");
            return (Criteria) this;
        }

        public Criteria andCladdressGreaterThanOrEqualTo(String value) {
            addCriterion("clAddress >=", value, "claddress");
            return (Criteria) this;
        }

        public Criteria andCladdressLessThan(String value) {
            addCriterion("clAddress <", value, "claddress");
            return (Criteria) this;
        }

        public Criteria andCladdressLessThanOrEqualTo(String value) {
            addCriterion("clAddress <=", value, "claddress");
            return (Criteria) this;
        }

        public Criteria andCladdressLike(String value) {
            addCriterion("clAddress like", value, "claddress");
            return (Criteria) this;
        }

        public Criteria andCladdressNotLike(String value) {
            addCriterion("clAddress not like", value, "claddress");
            return (Criteria) this;
        }

        public Criteria andCladdressIn(List<String> values) {
            addCriterion("clAddress in", values, "claddress");
            return (Criteria) this;
        }

        public Criteria andCladdressNotIn(List<String> values) {
            addCriterion("clAddress not in", values, "claddress");
            return (Criteria) this;
        }

        public Criteria andCladdressBetween(String value1, String value2) {
            addCriterion("clAddress between", value1, value2, "claddress");
            return (Criteria) this;
        }

        public Criteria andCladdressNotBetween(String value1, String value2) {
            addCriterion("clAddress not between", value1, value2, "claddress");
            return (Criteria) this;
        }
    }

    /**
     */
    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}